{extend name="public/base" /}
    {block name="content"}
        <section class="content-header">
<h1>
           编辑栏目
<small>edit term</small>
</h1>
<ol class="breadcrumb">
	<li><a href="{:U('Index/index')}"><i class="fa fa-dashboard"></i> 首页</a></li>
	<li class="active">编辑栏目</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
	<div class="col-xs-12">
		<div class="box">
			<div class="box-header">

				<h3 class="box-title">
				<a href="{:U('Term/index')}" class="btn btn-primary">栏目管理</a>&nbsp;&nbsp;
				<a href="{:U('Term/addTerm')}" class="btn btn-primary">添加栏目</a>&nbsp;&nbsp;
				<!-- <a href="{:U('Term/addPage')}">添加单页</a>&nbsp;&nbsp; -->
				<!-- <a href="{:U('Term/addTerm')}">更新栏目缓存</a>&nbsp;&nbsp; -->
				</h3>
			</div>
			<form action="{:U('Term/postEdit')}" method="post">
				<input type="hidden" name="id" value="{$edit_info.id}">
				<div class="box-body">
					<!--输入框 -->
					
					<div class="box-body pad" style="padding:10px 20px;">
				       <label>所属栏目：</label>
						<select name="parent_id" id="parent_id" class="form-control">
							<option value="0">作为一级栏目</option>
				{volist name="all_term" id="data"}
							<option value="{$data.id}" {if condition="($data['id'] eq $edit_info['parent_id'])"}selected{/if}>{$data.name}</option>
				  {/volist}
						</select>
					</div>
					
					<div class="box-body pad" style="padding:10px 20px;">
				       <label>所属模型：</label>
						<select name="model_id" id="parent_id" class="form-control">
							<option value="0">选择所属模型</option>
				               {foreach $modelList as $id => $model}
								<option value="{$id}" {if condition="($id eq $edit_info['model_id'])"}selected{/if}>{$model}</option>
								{/foreach}
						</select>
					</div>
					

					<div class="box-body pad" style="padding:10px 20px;">
					    <label>栏目名称:</label>
						<input class="form-control" name="name" value="{$edit_info['name']}" placeholder="栏目名称">
					</div>
					<div class="box-body pad" style="padding:10px 20px;">
					    <label>栏目标识:</label>
						<input class="form-control" name="flag" value="{$edit_info['flag']}" placeholder="栏目标识">
					</div>
					<div class="box-body pad" style="padding:10px 20px 0px 20px;">
					    <label>栏目描述:</label>
						<textarea class="form-control" rows="4" name="description" value="" placeholder="添加栏目描述">{$edit_info['description']}</textarea>
					</div>
					<div class="box-body pad" style="padding:10px 20px;margin-top:20px;color:#999999;">
			            是否在导航显示：

						<input type="radio" name="display_nav" value="1" {if condition="($edit_info['display_nav'] eq 1)"}checked="checked"{/if}>是&nbsp;&nbsp;
						<input type="radio" name="display_nav" value="0" {if condition="($edit_info['display_nav'] eq 0)"}checked="checked"{/if}>否&nbsp;&nbsp;
					</div>
					<!--输入框 END-->
					<style>
						.box-addtab a{
							cursor: pointer;
							font-size: 18px;
							margin-right: 20px;
							color: #444;
						}
						.box-activeadd{
							font-size: 18px;
							color: #367fa9 !important;
						}
					</style>
					<div class="box-header with-border box-addtab" style="margin:0 18px;padding-left:0;">
						<a class="box-activeadd">基本设置</a>
						<a >高级设置</a>
						<a >自定义设置</a>
					</div>
					<div class="tab-add" id="tab_kc1">
						<div class="box-body pad" style="padding:10px 20px;">
							<label>栏目标题:</label>
							<input class="form-control" name="seo_title" value="{$edit_info['seo_title']}" placeholder="META Title（栏目标题）">
						</div>
						<div class="box-body pad" style="padding:10px 20px;">
							<label>关键词:</label>
							<input class="form-control" name="seo_keywords" value="{$edit_info['seo_keywords']}" placeholder="META Keywords（栏目关键词）">
						</div>
						<div class="box-body pad" style="padding:10px 20px 0px 20px;">
							<label>摘要:</label>
							<textarea class="form-control" rows="4" name="seo_description" value="" placeholder="摘要描述">{$edit_info['seo_description']}</textarea>
						</div>
						{foreach $formList as $name => $form}
						<div class="box-body pad" style="padding:10px 20px;">
							{$name}:
							{$form}
						</div>
						{/foreach}
					</div>

					<div class="tab-add" id="tab_kc2" style="display: none">
						<div class="box-body pad" style="padding:10px 20px;">
							<label>栏目标题2:</label>
							<input class="form-control" name="seo_title" value="{$edit_info['seo_title']}" placeholder="META Title（栏目标题）">
						</div>
						<div class="box-body pad" style="padding:10px 20px;">
							<label>关键词:</label>
							<input class="form-control" name="seo_keywords" value="{$edit_info['seo_keywords']}" placeholder="META Keywords（栏目关键词）">
						</div>
						<div class="box-body pad" style="padding:10px 20px 0px 20px;">
							<label>摘要:</label>
							<textarea class="form-control" rows="4" name="seo_description" value="" placeholder="摘要描述">{$edit_info['seo_description']}</textarea>
						</div>
						{foreach $formList as $name => $form}
						<div class="box-body pad" style="padding:10px 20px;">
							{$name}:
							{$form}
						</div>
						{/foreach}
					</div>


					<div class="tab-add" id="tab_kc3" style="display: none">
						<div class="box-gdt" style="  overflow-y: auto; height: 388px;">
							<div class="box-body pad" style="padding:10px 20px;">
								<label>栏目标题3:</label>
								<input class="form-control" name="seo_title" value="{$edit_info['seo_title']}" placeholder="META Title（栏目标题）">
							</div>
							<div class="box-body pad" style="padding:10px 20px;">
								<label>关键词:</label>
								<input class="form-control" name="seo_keywords" value="{$edit_info['seo_keywords']}" placeholder="META Keywords（栏目关键词）">
							</div>
							<div class="box-body pad" style="padding:10px 20px;">
								<label>关键词:</label>
								<input class="form-control" name="seo_keywords" value="{$edit_info['seo_keywords']}" placeholder="META Keywords（栏目关键词）">
							</div>
							<div class="box-body pad" style="padding:10px 20px;">
								<label>关键词:</label>
								<input class="form-control" name="seo_keywords" value="{$edit_info['seo_keywords']}" placeholder="META Keywords（栏目关键词）">
							</div>
							<div class="box-body pad" style="padding:10px 20px 0px 20px;">
								<label>摘要:</label>
								<textarea class="form-control" rows="4" name="seo_description" value="" placeholder="摘要描述">{$edit_info['seo_description']}</textarea>
							</div>
							{foreach $formList as $name => $form}
							<div class="box-body pad" style="padding:10px 20px;">
								{$name}:
								{$form}
							</div>
							{/foreach}
						</div>



					</div>

					<script type="text/javascript">
						$(function(){
							$(".box-addtab a").each(function(j){
								var num=j+1;
								$(this).click(function(){
									$(".box-addtab a").attr("class","");
									$(this).attr("class","box-activeadd");
									for(var i=1;i<=3;i++){
										$("#tab_kc"+i).css("display","none");
									}
									$("#tab_kc"+num).css("display","block");
								});
							});
						})
					</script>


				</div>
				<!-- END -->
				<div class="box-body pad" style="padding:10px 20px 0px 20px;">
					<div class="box-footer">
						<input type="submit" class="btn btn-block btn-primary" style="width:100px; border:none; margin-bottom:20px;" value="Submit"/>
					</div>
				</div>
				
				<div style="clear:both">
				</div>
			</form>
		</div>
	</div>
</div>
</section>  
        
    {/block}
